<!DOCTYPE >
<html lang="zh-cn">

	<head>
		<title>后台管理-服务项目编辑</title>
		<% include ../partials/head %>
			<link rel="stylesheet" type="text/css" href="/assets/js/tag/jquery.tagsinput.css">
			<link rel="stylesheet" href="/assets/js/button/ladda/ladda.min.css">

	</head>

	<body>
		<header>
			<!-- Preloader -->
			<div id="preloader">
				<div id="status">&nbsp;</div>
			</div>
			<% include ../partials/header %>
		</header>
		<div class="ch-container">
			<% include ../partials/sidebar %>
				<!-- 首页内容 -->
				<div class="wrap-fluid">
					<div class="container-fluid paper-wrap bevel tlbr">

						<!-- CONTENT -->
						<!--TITLE -->
						<div class="row">
							<div id="paper-top">
								<div class="col-sm-3">
									<h2 class="tittle-content-header">
			                            <span class="entypo-menu"></span>
			                            <span>服务项目编辑</span>
                        				</h2>

								</div>

								<div class="col-sm-7">
									<div class="devider-vertical visible-lg"></div>
									<div class="tittle-middle-header">

										<div class="alert">
											<button type="button" class="close" data-dismiss="alert">×</button>
											<span class="tittle-alert entypo-info-circled"></span> 欢迎回来,&nbsp;
											<strong><%= username%></strong>&nbsp;&nbsp;记得今天要完成预期任务哦…^_^！
										</div>

									</div>

								</div>
							</div>
						</div>
						<!--/ TITLE -->

						<!-- BREADCRUMB -->
						<ul id="breadcrumb">
							<li>
								<span class="entypo-home"></span>
							</li>
							<li><i class="fa fa-lg fa-angle-right"></i>
							</li>
							<li><a href="/admin/server" title="服务项目管理">服务项目管理</a>
							</li>
							<li><i class="fa fa-lg fa-angle-right"></i>
							</li>
							<li><a href="#" title="服务添加">服务编辑</a>
							</li>

							<li class="pull-right">
								<div class="input-group input-widget">

									<input style="border-radius:15px" type="text" placeholder="Search..." class="form-control">
								</div>
							</li>
						</ul>

						<!--测试数据-->
						<div class="content-wrap">
							<div class="row">
								<div class="col-sm-12">
									<div class="nest" id="elementClose">
										<div class="title-alt">
											<h6>
                                    服务框</h6>
											<div class="titleClose">
												<a class="gone" href="#elementClose">
													<span class="entypo-cancel"></span>
												</a>
											</div>
											<div class="titleToggle">
												<a class="nav-toggle-alt" href="#element">
													<span class="entypo-up-open"></span>
												</a>
											</div>

										</div>

										<div class="body-nest" id="element">

											<div class="panel-body">
												<form role="form" id="serverForm" class="form-horizontal bucket-form" enctype="multipart/form-data" method="post" action="/admin/server/edit">
													<div class="form-group">
														<label class="col-sm-3 control-label">内容</label>
														<div class="col-sm-6">
															<input type="text" name="content" class="content form-control" value="<%=server.get('content')%>">
														</div>
													</div>
													<div class="form-group">
														<label class="col-sm-3 control-label">优先级</label>
														<div class="col-sm-6">
															<input type="text" name="priority" class="form-control" placeholder="例如：12" value="<%=server.get('priority')%>">
															<span class="help-block">注：数字表示，越大代表优先级越高，将会有限显示</span>
														</div>
													</div>
													<div class="form-group">
														<label class="col-sm-3 control-label">类型</label>
														<div class="col-sm-6">
															<input type="text" name="type" class="form-control" placeholder="例如：0" value="<%=server.get('type')%>">
															<span class="help-block">注：服务类型（0：线上，1：线下）</span>
														</div>
													</div>
													<div class="form-group">
														<label class="col-sm-3 control-label">图片</label>
														<div class="col-sm-6">
															<input type="file" id="serverImg" name="serverImg">
															<img src="<%=server.get('img').url()%>" style="max-height:100px" alt="" />
														</div>
													</div>
													<div class="form-group">
														<label class="col-sm-3 control-label">是否添加New标志</label>
														<div class="col-sm-6">
															<input type="text" name="isNew" class="form-control" value="<%=server.get('isNew')%>" placeholder="例如：0">
															<span class="help-block">注：（0：不添加，1：添加）</span>
														</div>
													</div>
													<div class="form-group">
														<label class="col-sm-3 control-label">每小时的价格</label>
														<div class="col-sm-3">
															<input type="text" name="price" placeholder="" class="form-control" value="<%=server.get('price')%>">
														</div>
													</div>
													<div class="form-group">
														<label class="col-sm-3 control-label">开通区域</label>
														<div class="col-sm-6" style="height:120px">
															<input id="tags_server" name="area" type="text" class="form-control tags" value="<%=server.get('area')%>">
														</div>
														<span class="help-block">注：可单个添加和多个添加，多个添加时使用英文逗号分隔，然后点击下x，自然分开，try</span>

													</div>
													<input type="hidden" name="objectId" value=<%= server.id %> >
													<div class="form-group">
														<label class="col-sm-4 control-label"></label>
														<button class="submit btn-info col-sm-4 ladda-button" data-size="s" data-style="contract-overlay">提交</button>
													</div>

												</form>
											</div>

										</div>

									</div>
								</div>
							</div>
						</div>

					</div>
				</div>

				<!-- END OF BREADCRUMB -->

				<!-- /END OF CONTENT -->

				<!-- FOOTER -->
				<div class="footer-space"></div>
				<div id="footer">
					<div class="devider-footer-left"></div>
					<div class="time">
						<p id="spanDate">
							<p id="clock">
					</div>
					<div class="copyright">Made by HT
						<span class="entypo-heart"></span>广州小蚕信息科技有限公司</div>
					<div class="devider-footer"></div>

				</div>
				<!-- / END OF FOOTER -->

		</div>
		</div>

		<% include ../partials/footer %>
			</div>
			<% include ../partials/external %>

				<script type="text/javascript" src="/assets/js/tag/jquery.tagsinput.js"></script>
				<script src="/assets/js/button/ladda/spin.min.js"></script>

				<script src="/assets/js/button/ladda/ladda.min.js"></script>

				<script type="text/javascript">
					$(function() {
						$('#tags_server').tagsInput({
							width: 'auto'
						});
						Ladda.bind('.submit', {
							timeout: 30000
						});
					})
				</script>
	</body>

</html>